<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

  <style>
    body>div{
      width: 400px;
      height: 400px;
      border: 1px solid red;
    }

    #d1{
      width: 100px;
      height: 100px;
      background-color: #333333;
      /*float: right;*/
      /*float: left;*/
    }
    #d2{
      width: 100px;
      height: 100px;
      background-color: #0bf700;
      /*float: right;*/
      /*float: left;*/
    }
    #d3{
      width: 100px;
      height: 100px;
      background-color: #0000ff;
      /*float: right;*/
      /*float: left;*/
    }
    ul{
      list-style-type: none;
      overflow: hidden;
    }
    li{
      float: left;
      margin-right: 20px;
    }
    a{
      text-decoration: none;
    }




  </style>

</head>
<body>
<ul>
  <li><a href="">首页</a></li>
  <li><a href="">免费课</a></li>
  <li><a href="">直播课</a></li>
  <li><a href="">线上班</a></li>
  <li><a href="">线下班</a></li>
</ul>
<div>
  <div id="d1"></div>
  <div id="d2"></div>
  <div id="d3"></div>
</div>
</body>
</html>